package com.smartshopping.iu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class AboutActivity extends Activity {

	private int curImage = 0;
	private int arrImg[] = {R.drawable.about2, R.drawable.about3, R.drawable.about4, R.drawable.about5};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		createButton();
	}

	public void createButton()
	{
		final ImageView imageView = (ImageView)findViewById(R.id.about_member);
		imageView.setOnClickListener(new OnClickListener() {
	        @Override
	        public void onClick(View v) {
	        	curImage++;
	        	if (curImage > 3) curImage = 0;
	        	imageView.setImageResource(arrImg[curImage]);
	        }
	    });
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.about, menu);
		return true;
	}

}
